package com.project.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

/**
 * 供应商的退货单
 */
@Data
@TableName("t_supply_refund")
public class SupplyRefundEntity implements Serializable {

    @TableId(value = "pk_refundId", type = IdType.AUTO)
    private long refundId;//id

    @TableField("r_refundRef")
    private String refundRef;//退货订单唯一编号

    @TableField("fk_supplyRef")
    private long supplyRef;//供货单编号

    @TableField("r_batch")
    private String batch;//供货批次

    @TableField("r_dateTime")
    private LocalDateTime dateTime = LocalDateTime.now();//发起退货时间

    @TableField("r_orderMoney")
    private int orderMoney;//订单金额

    @TableField("r_status")
    private int status;//订单状态 //订单状态码,  0未发货   1 发货  2 已完成


    @TableField(exist = false)
    private  SupplyOrderEntity supplyOrderEntity ;//退货单对应的供货单

    @TableField(exist = false)
    private  SupplierEntity supplierEntity ;//退货单对应供应商

    @TableField(exist = false)
    private List<SupplyGoodsEntity> supplyGoodsEntityList;//退货单的所有商品

    @TableField(exist = false)
    private List<SupplyOrderRefundRecordEntity> supplyOrderRefundRecordEntityList ;//退货单对应的所有审核记录


}
